package com.mgs.common.core.bean;

import com.mgs.common.core.bean.support.MapProxy;
import lombok.NoArgsConstructor;
import org.omg.CORBA.PUBLIC_MEMBER;

import java.util.Map;
import java.util.Objects;

/**
 * @ClassName MGSProsy
 * @Description 抽象工具类
 * @Author zhanglei
 * @Date 2021/12/17 14:46
 * @Version 1.0
 */
@NoArgsConstructor
public abstract class MGSProxy<T> {

    public abstract Class<T> getInnerType();

    public abstract void replaceInnerObject(T t);

    public static <T> MGSProxy<T> getInstance(Class<T> type) {
        if (Map.class.isAssignableFrom(type)) {
            return new MapProxy(type);
        }

        return null;
    }


}
